import request from '@/utils/request'
import qs from 'qs'

// 用户群组列表
export function getUserGroupList(params) {
  return request({
    url: '/cluster/findList',
    method: 'get',
    params
  })
}

// 创建用户群组
export function addUserGroup(data) {
  const postData = qs.stringify(data)
  return request({
    url: '/cluster/add',
    method: 'post',
    data: postData
  })
}

// 删除用户群组
export function removeUserGroup(params) {
  return request({
    url: '/cluster/remove',
    method: 'post',
    params
  })
}

// 用户群组下相关菜单
export function getUserGroupMenu(params) {
  return request({
    url: '/cluster/findCluster',
    method: 'post',
    params
  })
}
